package org.rency.ues.domain.response;

import org.rency.common.utils.domain.BaseResult;
import org.rency.ues.common.UesDict;
import org.rency.ues.common.enums.EncryptType;

/**
 * ${todo}
 *
 * @author: Created by user_rcy@163.com on 2016/8/3.
 * @version: V1.0.0
 * @since JDK 1.8
 */
public class DecryptResponse extends BaseResult{

    /**
     * 密文Key
     */
    private String encryptedKey;

    /**
     * 密文
     */
    private String encryptedData;

    /**
     * 证书序列号
     */
    private String serialNo;

    /**
     * 加密方式
     */
    private EncryptType encryptType;

    private String privateKey;

    private String ticket;

    public String getEncryptedKey() {
        return encryptedKey;
    }

    public void setEncryptedKey(String encryptedKey) {
        this.encryptedKey = encryptedKey;
    }

    public String getEncryptedData() {
        return encryptedData;
    }

    public void setEncryptedData(String encryptedData) {
        this.encryptedData = encryptedData;
    }

    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    public EncryptType getEncryptType() {
        return encryptType;
    }

    public void setEncryptType(EncryptType encryptType) {
        this.encryptType = encryptType;
    }

    public String getPrivateKey() {
        return privateKey;
    }

    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }

    public String getTicket() {
        return ticket;
    }

    public void setTicket(String ticket) {
        this.ticket = ticket;
    }

    public static DecryptResponse success(){
        DecryptResponse resp = new DecryptResponse();
        resp.setSuccess(true);
        resp.setReturnMessage(UesDict.CHINESE_SUCCESS_MSG);
        return resp;
    }

    public static DecryptResponse fail(String returnMessage){
        DecryptResponse resp = new DecryptResponse();
        resp.setSuccess(false);
        resp.setReturnMessage(returnMessage);
        return resp;
    }

}
